import cv2

img = cv2.imread('boom_img.png')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
t, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)
contours, hierarchy = cv2.findContours(binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
hull = cv2.convexHull(contours[0])
cv2.polylines(img, [hull], True, (0, 0, 255), 2)
cv2.imshow('img', img)
cv2.waitKey()
cv2.destroyAllWindows()
